package com.doit.demo05;

import java.io.File;

public class test02_File {
    public static void main(String[] args) {
        //不检测路径是否存在
        File file1 = new File("d:\\work\\abc\\1.txt");
        System.out.println(file1);

        //根据父路径和子路径创建文件对象 同样也不检测路径是否存在
        File file2 = new File("d:\\work\\abc","1.txt");
        System.out.println(file2);

        //根据父路径创建文件对象  同样也不检测路径是否存在
        File dir = new File("d:\\work\\abc");
        File file3 = new File(dir,"1.txt");
        System.out.println(file3);

    }
}
